package lxh.groovy.basic;


class StringMethodTest 
{

	static void main(args) 
	{
		String str = "howareyou";
		boolean b = str.contains("are");
		println b;
		
		str = "how are you";
		def strs  = str.tokenize(" ");
		println strs[0]+strs[1];
		str = str  - "are";
		println str;
		
		str = "abcdefgh";
		def str1 = str[3..6];
		println str1;
		str1 = str[-4..-1];
		println str1;
		str1 = str[-1..-4];
		println str1;
		str1 = str[3..1];
		println str1;
		
	}

}